$(document).ready(function () {
    queryMyPartyAndMember();
});
//js里获取session里保存的值，例如:
/*function getMyName(){
    var myName="<%=session.getAttribute("MYNAME")%>";
    alert(myName);
}*/
//查询个人党组织信息和自己的入党情况
var queryMyPartyAndMember = function () {
    $.ajax({
        url: "http://localhost:8080/partyApply/queryMyParty",
        type: "GET",
        async: true,
        data: "partyMemberAccount=" + 20151012,
        dataType: "json",
        success: function (data) {
            console.log(data);
            console.log(data.data);
            console.log(data.data)
            /* for(var key in data.data) {
                 alert("键：" + key + ",值 ：{姓名："+ data.data[key].partyFoundTime+"}");
             }
            */
            /*  console.log(data.data.MyParty);*/
              console.log(data.data.PartyMemberMe);
            var party = data.data.MyParty;
            var PartyMemberMe = data.data.PartyMemberMe;
            alert(PartyMemberMe.applyDate);
            //党组织名称
            $("#partyName").val(party.partyName);
            //党组织概况
            $("#partyDescription").html("&nbsp;&nbsp;" + party.partyDescription);
            //党组织成立时间
            $("#partyFoundTime").val(party.partyFoundTime);
            //党员申请入党时间
            $("#stuApplyDate").val(PartyMemberMe.applyDate);
            if (PartyMemberMe.partyMemberType==1){
                $("#stuPoli").val("积极分子");
            }else if (PartyMemberMe.partyMemberType==2) {
                $("#stuPoli").val("发展对象");
            }else if (PartyMemberMe.partyMemberType==3) {
                $("#stuPoli").val("中共预备党员");
            }else{
                $("#stuPoli").val("中共党员");
            }
          //  alert("执行到底");
        }
    });
}

